<template>
  <div class="item">
    <p class="itemTitle">{{source.LBL}}</p>
    <p class="itemDesc">{{source.DESC}}</p>
    <div class="itemDefault">
      <el-input
        type="textarea"
        :rows="2"
        placeholder="请输入内容"
        v-model="source.DEFAULT"
        :minlength="source.MIN"
        :maxlength="source.MAX"
        show-word-limit
      ></el-input>
    </div>
  </div>
</template>
<script>
export default {
  name: "viewTextarea",
  props: {
    source: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  methods: {
    async submit() {
      return Promise.resolve({ [this.source._id]: this.source.DEFAULT });
    }
  }
};
</script>
<style lang="scss" scoped src="./comView.scss"></style>